﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Cjc.Data.Mapping
{
	public interface IModelEntity<TModel>
	{
		TModel Model { get; }
		object Entity { get; }
	}

	public class ModelEntity<TModel, TEntity> : IModelEntity<TModel>
	{
		public TModel Model { get; set; }
		public TEntity Entity { get; set; }

		public ModelEntity( TModel model, TEntity entity )
		{
			this.Model = model;
			this.Entity = entity;
		}

		#region IModelEntity<TModel> Members

		object IModelEntity<TModel>.Entity { get { return Entity; } }

		#endregion
	}
}